package lab02.test10;

public class People {
    //属性
    String name;
    String gender;
    int age;

    //构造函数
    public People() {
    }

    public People(String name, String gender, int age) {
        this.name = name;
        this.gender = gender;
        this.age = age;
    }

    //行为
    public void work() {
        System.out.println("工作！");
    }

    public void eat() {
        System.out.println("吃饭！");
    }

    public void sleep() {
        System.out.println("睡觉！");
    }

    @Override
    public String toString() {
        return name + "\t" + gender + "\t" + age;
    }

}
